#include <Windows.h>
#include <stdio.h>
#include <tchar.h>
#include <conio.h>
#include "xpeuser.h"
int _tmain(int argc, TCHAR** argv)
{
	char* hModule;
	PIMAGE_FILE_HEADER pFileHeader;
	PIMAGE_OPTIONAL_HEADER pOptionalHeader;
	ULONG_PTR EntryPoint;
	hModule = LoadUserImage("64.exe");
	if(!hModule)
		goto Leave;
	pFileHeader = GetFileHeaderFromBase(hModule);
	pOptionalHeader = (PIMAGE_OPTIONAL_HEADER)(pFileHeader + 1);
	EntryPoint = pOptionalHeader->AddressOfEntryPoint;
	EntryPoint += (ULONG_PTR)hModule;
	((void (*)())EntryPoint)();
Leave:
	printf("press any key to continue...");
	getche();
	//you will never get here
	return 0;
}